/**
 * @param {number[]} nums
 * @param {number} target
 * @return {number}
 */

var search = function (nums, target) {
    let len = nums.length
    // 记录target在数组中出现的次数
    let total = 0
    for (let i = 0; i < len; i++) {
        if(nums[i]===target){
            total++
        }
    }
    return total
};